Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix paths for enabled scripts in ExprScripts. #6374

Merged
merged 6 commits into from
Feb 1, 2024

Conversation

sovdeeth
Copy link
Member

@sovdeeth sovdeeth commented Jan 30, 2024

Description

Disabled scripts are stored as files with relative paths, so the code works perfectly already.
Enabled scripts are Configs with Paths created by File#toPath(), so ExprScripts converts them back into Files with Path#toFile(). This creates a File with an absolute path, not relative.
This fix relativizes the paths of all the scripts to the scripts folder.

There's an existing issue of accuracy in the disabled scripts that will be handled in another PR.


Target Minecraft Versions: any
Requirements: none
Related Issues: #6373

@sovdeeth sovdeeth added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. 2.8 Targeting a 2.8.X version release labels Jan 30, 2024
@sovdeeth sovdeeth added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Feb 1, 2024
@APickledWalrus APickledWalrus merged commit 555c76b into SkriptLang:dev/patch Feb 1, 2024
4 checks passed
ShaneBeee pushed a commit to ShaneBeee/Skript that referenced this pull request Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.8 Targeting a 2.8.X version release bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants